package com.guchenbo.scala

/**
 * @author guchenbo
 * @date 2022/3/11
 */
object Op {

  def main(args: Array[String]): Unit = {
    println(1 + 2)
    println(1.+(2))

    for (i <- 1 to 10) println(i)
    for (i <- 1 until 10) println(i)

    println("###########")
    for (i <- 1 until 10 if i != 5) println(i)

//    val func3 = def func(name: String): String = {
//      name
//    }

    //    函数赋值给变量
//    val func2 = (name: String) => {}

    val s=2
    println(s.isInstanceOf[Int])
    s.asInstanceOf[Long]
    println(classOf[Int])
  }
}
